package com.nanbei.a09;

import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * @ClassDescription:
 * @JdkVersion: 1.8
 * @Author: libs
 * @Created: 2024/11/14 17:29
 */
@Component
public class E {

    @Lazy
    @Autowired
    F1 f1;

    @Autowired
    F2 f2;

    @Autowired
    ObjectFactory<F3> f3;

    @Autowired
    ApplicationContext applicationContext;

    public F1 getF1() {
        return f1;
    }

    public F2 getF2() {
        return f2;
    }

    public F3 getF3() {
        return f3.getObject();
    }

    public F4 getF4() {
        return applicationContext.getBean(F4.class);
    }
}
